The biggest contribution to location error when tracking with low quality sensors, such as those used in smartphones and similar handheld devices, is typically due to errors in the heading of the user being tracked. In a particle filter implementation, each particle represents a possible location solution with system state including, device location, orientation, and other sensor parameters depending on the system being tracked and sensors being used. Constraints can be applied to the particles in the particle filters used for location determination that de-weight particles that are heading in a direction that is different from that indicated by the received sensor data or other inferred heuristic heading information. The difficult part of defining constraints is determining how tight to make them. Tight constraints around the indicated heading are reasonable, if there is high confidence that the indicated heading is correct.
When outside and away from a building (and other magnetic disturbances) compass based heading constraints are highly reliable and tight constraints can be applied to obtain a good heading lock. FIG. 1 illustrates a heading lock obtained in a good magnetic field. The top histogram in FIG. 1 shows the heading distribution of the particles for a person walking northwest towards a building with a path parallel to the building edge. The distribution is tightly centered on the true heading. The bottom of FIG. 1 shows the location distribution of particles. The shading of the particles is indicative of particle weight (higher weights toward the middle and, lower weights toward the outside). Two of the circles overlaying the particle distribution show 1) a location and heading circle—a circle of fixed size centered on the location estimate with a line to the perimeter indicating the heading estimate, and 2) the circular error probability (CEP) particle error—a circle containing 50% of the particles.
When in or around buildings or vehicles or other sources of magnetic fields, however, compass based heading constraints are not as reliable and tight constraints are difficult to apply.